﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.Models;
using PBOffice.BLL;

public partial class Message_OneMessage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string msgId = Request.QueryString["mid"];
       Message msg = new MessageManager().GetMessageById(Convert.ToInt32(msgId));
        this.lbTitle.Text = msg.Title;
        this.lbName.Text = msg.FromUserId;
        this.lbTime.Text = msg.RecordTime.ToString();
        this.lbType.Text = msg.Type.MessageTypeName;
        this.txtContent.Text = msg.Contents;

    }
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        Response.Write("<script>window.opener=null;window.close();</script>");
    }
}